<?php
$m = 2;
$n = 3;
$table = "<table border='1'>";
for ($i = 1; $i <= $m; $i++) {
  $table .= "<tr>";
  for ($j = 1; $j <= $n; $j++) {
    $table .= "<td>m:$i,n:$j</td>";
  }
  $table .= "</tr>";
}
$table .= "</table>";
echo $table;
